/*
 * @Author: sunzhijun 
 * @Date: 2020-02-28 21:36:16 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2020-03-13 14:18:22
 */

import { render } from 'src/hrpub/common/frame';
import NewaddAction from '../../actions/newadd';
import CardAction from '../../actions/card';

const FormView = render({
    actions: {
        newaddAct: NewaddAction,
        cardAct: CardAction
    }
})(({ props, action, state }) => {
    const { main, form } = props;
    let { formVisible, popCardId } = main;
    return (
        !!formVisible ?
        form.createForm(popCardId, {
            // expandArr: ['dataAfter_add'],
            onAfterEvent: action.newaddAct.onAfterEvent,
            // onBeforeEvent: action.newaddAct.handleEditBefore
        }) : null
    )
})
export default FormView;